#!/usr/bin/python3

def countStar(line):
    starNum = 0
    for ch in line:
        if(ch == '*'):
            starNum += 1
    print(starNum)

line = input('Please enter a line, # to end:\n')
while line != '#':
    countStar(line)
    line = input('Please enter a line, # to end:\n')